// $Id: ConstantException.java,v 1.3 2005/11/01 11:01:25 wangxz Exp $
package com.yypinger.common.misc;

/**
 * Constant exception when pass invalid parameter to {@link Constants}.<br>
 *
 * Copyright &copy; 2005 Runway Technology Co., LTD. All rights reserved.
 *
 * @author <a href="mailto:zhangxiaohai@runway.cn.net">Zhang Xiaohai</a>
 * @version $Revision: 1.3 $
 */
public class ConstantException extends IllegalArgumentException {
    /** Serial Version UID. */
    private static final long serialVersionUID = 6939812935351112894L;

    public ConstantException() {
    }

    public ConstantException(String className, String field, String message) {
        super("Field '" + field + "' " + message + " in class [" + className + "]");
    }

    public ConstantException(String className, String namePrefix, Object value) {
        super("No '" + namePrefix + "' field with value '" + value
                + "' found in class [" + className + "]");
    }
}
